eststo clear
local O smv EFF Nw shH 
foreach o of local O{

eststo: reghdfe `o' SAMPLE, abs(fmy dd data_fem) vce(cluster factory_code) 
  quietly estadd local CTRL ="\scriptsize{B}", replace  
  quietly estadd local est ="OLS", replace  
  quietly estadd local FE ="sm($\tau$),$\tau$", replace  
  quietly estadd local CTRL2 ="Yes", replace    
  quietly estadd scalar  U =  . , replace   
  
}
*
esttab using "${tables}\TableB3.tex", ///
  title("Buyers' Sourcing and Labor Usage" \label{LaborUsage}) ///
  label replace booktabs b(3) se(3) noconstant obslast substitute(\_ _) ///
  drop(  ) order() /// 
  stats(FE   r2   N   , fmt( %~#s   2 %12.0fc  )  ///
  labels("FEs"  `"\(R^{2}\)"'  "Obs."  ))   ///
  star(* 0.10 ** 0.05 *** 0.01) ///
  nonotes  